{% extends "wiki/base.html" %}

{% load i18n %}
{% load wiki %}
{% load wikiurl %}
{% load pagination_tags %}
{% load humanize %}

{% block head_title %}Wiki for {{ group.name }}{% endblock %}

{% block body %}
    <p><span class="warning">Note</span>: this is an <b>experimental</b> feature that is subject to massive change at any time.</p>

    {% wiki_title group %}

    {% include "wiki/searchbox.html" %}

    {% autopaginate articles %}

    {% regroup articles by created_at.date as articles_by_creation_date %}

    {% if articles %}
        {% for date in articles_by_creation_date %}
            <h2 class="join_date">{{ date.grouper|naturalday:_("MONTH_DAY_FORMAT")|capfirst }}</h2>

            {% for article in date.list %}
                <a href="{% wikiurl article group article %}">{{ article.title }}</a><br />
            {% endfor %}
        {% endfor %}
    {% endif %}

    {% if allow_write %}
        <p>Start a <a href="{% wikiurl edit group new_article %}">NewArticle</a>.</p>
    {% endif %}

{% endblock %}
